#include <stdio.h>
#include <unistd.h>

int main() {
    char *arglist[3];

    arglist[0] = "ls";
    arglist[1] = 0;
    arglist[2] = 0;//NULL
    printf("*** I want to exec ‘ls’ ***\n");
    execvp("ls", arglist);
    printf("*** ‘ls’  is done ***\n");

    return 0;
}
